<!DOCTYPE html>
<html>
<head>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>个人中心</title>
    <link rel="stylesheet" href="/static/layui/css/layui.css">
  <style>
        .layui-form-item {
    width: 25%;
}
  body{padding: 50px 100px;}
.layui-inline{margin-right: 15px;}
    </style>
</head>

<body>


<form class="layui-form"  action="" lay-filter="demo-val-filter">

  <div class="layui-form-item">
    <label class="layui-form-label">姓名</label>
    <div class="layui-input-block">
      <input type="text" name="username" lay-verify="title" autocomplete="off" placeholder="请输入姓名" class="layui-input">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">生日</label>
    <div class="layui-input-block">
      <input type="text" class="layui-input" id="test-first" placeholder="日期格式：yyyy-MM-dd">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">姓名</label>
    <div class="layui-input-block">
      <input type="text" name="username" lay-verify="title" autocomplete="off" placeholder="请输入姓名" class="layui-input">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">输入框</label>
    <div class="layui-input-block">
      <input type="text" name="username" lay-verify="title" autocomplete="off" placeholder="请输入" class="layui-input">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">选择框</label>
    <div class="layui-input-block">
      <select name="interest" lay-filter="aihao">
        <option value=""></option>
        <option value="0">写作</option>
        <option value="1">阅读</option>
        <option value="2">游戏</option>
        <option value="3">音乐</option>
        <option value="4">旅行</option>
      </select>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">性别</label>
    <div class="layui-input-block">
      <input type="radio" name="sex" value="男" title="男" checked>
      <input type="radio" name="sex" value="女" title="女">
    </div>
  </div>
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button type="submit" class="layui-btn" lay-submit lay-filter="demo-val">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>

<script src="/static/jquery-3.7.1/jquery-3.7.1.min.js"></script>
<script src="/static/layui/layui.js"></script>
<!--<script src="/static/res/layui/layui.all.js"></script>-->

<script>
layui.use('laydate', function (laydate){

    //全局配置
  laydate.set({
    //trigger: 'focus'
  });

     // 日期选择器（单面板）
  laydate.render({
    elem: '#test-first',
    min: 0,
    shade: [0.1, '#000'],
    done: function () {
      console.log('done', arguments);
    },
    onConfirm: function () {
      console.log('confirm', arguments);
    },
    onNow: function () {
      console.log('now', arguments);
    },
    onClear: function () {
      console.log('clear', arguments);
    }
  });
})

        $(document).ready(function() {
             $.ajax({
                url: '/mgr/api/getrmbuserone', // 替换为您的注销视图的 URL
                type: 'POST',
                success: function(data) {
                                 // 当成功保存数据后，将后端返回的消息显示在页面上
                         if (data.code == 0){
                         window.location.href = 'signin';
                         }
                         else {
                        // 如果登录失败，可以在页面上显示错误信息
                        $('#resultContainer').html('<p>注销失败，请重试。</p>');
                        }
                },
                error: function(jqXHR, textStatus, errorThrown) {
                    // 处理注销失败的响应
                    alert('获取表单失败：' + textStatus);
                }
            });
        });
</script>

</body>
</html>